<template>
  <div class="conWidth">
    <Navigation :id="1" />
    <div class="flexbox">
      <div class="left">
        <div class="centent-box">
          <img :src="imgHost + webSetUp.logo" alt="" />
          <p>
            {{ webSetUp.copywriting }}
          </p>
          <Footer class="Footer" />
        </div>
      </div>
      <div
        class="right"
        :style="'background-image: url(' + (imgHost + webSetUp.indexImg) + ');'"
      ></div>
    </div>
  </div>
</template>

<script>
import Navigation from "@/components/Navigation/index.vue";
import Footer from "@/components/footer/footer.vue";
export default {
  components: { Navigation, Footer },
  data() {
    return {
      webSetUp: {
        logo: "",
        indexImg: "",
        copywriting: "",
      },
    };
  },
  created() {
    if (!localStorage.getItem("webSetUp")) {
      this.$load.show();
      this.$http.get("setUp/getSetUp").then((res) => {
        localStorage.setItem("webSetUp", JSON.stringify(res.data));
        this.webSetUp = res.data;
        this.$load.close();
      });
      return;
    }
    this.webSetUp = JSON.parse(localStorage.getItem("webSetUp"));
  },
};
</script>
<style lang="less" scoped>
.conWidth {
  height: 100%;
  .flexbox {
    height: 100%;
  }
  .left {
    width: 55%;
    position: relative;
    .centent-box {
      padding-top: 70%;
      margin-bottom: 40px;
      height: 100%;
      box-sizing: border-box;
      position: relative;
      img {
        width: 200px;
      }
      p {
        width: 80%;
        color: #52555a;
        text-indent: 2rem;
        font-size: 16px;
      }
      .Footer {
        position: absolute;
        bottom: 0;
      }
    }
  }
  .right {
    width: 45%;
    background: url(../../assets/img/index/VCG211305809611.jpg) no-repeat center;
    position: relative;
    margin-left: 7%;
  }
}
</style>